package com.vtquang.mygame2d.actor;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Vector2;

public abstract class MySprite2D {
	public Texture texture;
	public Vector2 position;
	public Vector2 size;
	public boolean isAlive = true;
	
	public MySprite2D(Texture texture){
		this.texture  = texture;
		this.size     = new Vector2(this.texture.getWidth(), this.texture.getHeight());
		this.position = new Vector2(0, 0);
	}
	
	public MySprite2D(Texture texture, Vector2 size){
		this.texture  = texture;
		this.size     = size;
		this.position = new Vector2(0, 0);
	}
	
	public MySprite2D(Texture texture, Vector2 size, Vector2 position){
		this.texture  = texture;
		this.size     = size;
		this.position = position;
	}
	
	public void update(float gameTime){
		
	}
	
	public void draw(SpriteBatch spriteBatch){
		spriteBatch.draw(texture, position.x, position.y, size.x, size.y);
	}
}
